"""
URL configuration for locallibrary project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import path
from catalog import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.index, name='index'),
    path('books/', views.book_list, name='book-list'),
    path('authors/', views.author_list, name='author-list'),
    path('author/<int:pk>/', views.author_detail, name='author-detail'),
    path('bookinstances/', views.bookinstance_list, name='bookinstance-list'),
    path('login/', views.login_view, name='login'),
    path('logout/', views.logout_view, name='logout'),
    path('my-books/', views.my_books, name='my-books'),
    path('renew-book/<int:pk>/', views.renew_book, name='renew-book'),
    path('author/create/', views.author_create, name='author-create'),
    path('author/<int:pk>/update/', views.author_update, name='author-update'),
    path('author/<int:pk>/delete/', views.author_delete, name='author-delete'),
    path('librarian/', views.librarian_view, name='librarian-view'),
]
